using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PACKETPARSERMAX20.CORE;

namespace PACKETPARSERMAX20.CORE.DEFINITIONS
{
    public class SMSG_SPELL_FAILED_OTHER_DEF : DefinitionBase
    {

        public override bool Process()
        {
            ResetPosition();
            UInt64 guid = popGuid();

            
           // InitLog(); //start the log


          //  if(LogIt) LogAppendLine("UInt64", "guid", guid,  true);

            if (ClientBuild >= 9183)
            {
                byte m_cast_count = ReadByte();
              //  if(LogIt) LogAppendLine("byte", "m_cast_count", m_cast_count);
            }
            UInt32 spellid = ReadUInt32();
          //  if(LogIt) LogAppendLine("UInt32", "spellid", spellid);

            if (ClientBuild >= 9183)
            {
                byte result = ReadByte();
              //  if(LogIt) LogAppendLine("byte", "result", result);

                if (AvailableBytes > 0)
                {
                    byte test1 = ReadByte();
                    byte test2 = ReadByte();
                    byte test3 = ReadByte();

                  //  if(LogIt) LogAppendLine("byte", "unk1", test1);
                  //  if(LogIt) LogAppendLine("byte", "unk2", test2);
                  //  if(LogIt) LogAppendLine("byte", "unk3", test3);

                }
            }


            

            return Validate();
        }
    }
}
